<!DOCTYPE html>
<html>

	<head>

		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<title>后台 - 管理员编辑</title>
		<meta name="keywords" content="">
		<meta name="description" content="">

		<link rel="shortcut icon" href="favicon.ico">
		<link href="__PUBLIC__/Admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/plugins/iCheck/custom.css" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/animate.min.css" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">

	</head>

	<body class="gray-bg">
		<div class="wrapper wrapper-content animated fadeInRight">
			<div class="row">
				<div class="col-sm-12">
					<div class="ibox float-e-margins">
						<div class="ibox-content">
							<form id="signform" method="post" action="{:U('Admin/Admin/edit')}" class="form-horizontal">
									<div class="form-group">
										<label class="col-sm-2 control-label">登录用户名：</label>
										<div class="col-sm-6">
											<input type="text" id="username" name="username" value="{$userinfo.username}"  class="form-control" readonly="">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">角色名：</label>
										<div class="col-sm-6">
											<input type="text" id="role" name="role" value="{$userinfo.role}"  class="form-control" >
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">密码</label>
										<div class="col-sm-6">
											<input type="text" id="password" name="password" value=""  class="form-control"><span class="help-block m-b-none" style="color: red;">留空则为不修改</span>
										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-2 control-label">权限</label>
										<div class="col-sm-6">
											<input type="checkbox" name="auth[]" value="index"  <if condition="in_array('index',explode(',',$userinfo['auth']))">checked</if> >主页
											<input type="checkbox" name="auth[]" value="site"  <if condition="in_array('site',explode(',',$userinfo['auth']))">checked</if>>网站设置
											<input type="checkbox" name="auth[]" value="pk10"  <if condition="in_array('pk10',explode(',',$userinfo['auth']))">checked</if>>系统配置
											<input type="checkbox" name="auth[]" value="member"  <if condition="in_array('member',explode(',',$userinfo['auth']))">checked</if>>会员管理
											<input type="checkbox" name="auth[]" value="order" <if condition="in_array('order',explode(',',$userinfo['auth']))">checked</if> >竞猜记录
											<input type="checkbox" name="auth[]" value="integral" <if condition="in_array('integral',explode(',',$userinfo['auth']))">checked</if> >上下分管理
											<input type="checkbox" name="auth[]" value="agent" <if condition="in_array('agent',explode(',',$userinfo['auth']))">checked</if> >代理管理
											<!-- <input type="checkbox" name="auth[]" value="kongzhi" <if condition="in_array('kongzhi',explode(',',$userinfo['auth']))">checked</if> >控制开奖 -->
											<input type="checkbox" name="auth[]" value="memberfs" <if condition="in_array('memberfs',explode(',',$userinfo['auth']))">checked</if> >会员返水
											<input type="checkbox" name="auth[]" value="caiji" <if condition="in_array('caiji',explode(',',$userinfo['auth']))">checked</if> >数据采集
											<input type="checkbox" name="auth[]" value="userwin" <if condition="in_array('userwin',explode(',',$userinfo['auth']))">checked</if> >输赢统计
											<input type="checkbox" name="auth[]" value="robot" <if condition="in_array('robot',explode(',',$userinfo['auth']))">checked</if> >机器人管理
											<input type="checkbox" name="auth[]" value="admin" <if condition="in_array('admin',explode(',',$userinfo['auth']))">checked</if> >管理员管理
											<input type="checkbox" name="auth[]" value="gonggao" <if condition="in_array('gonggao',explode(',',$userinfo['auth']))">checked</if> >发布公告
											<input type="checkbox" name="auth[]" value="deldata" <if condition="in_array('deldata',explode(',',$userinfo['auth']))">checked</if> >数据清理
										</div>
									</div>
									
									<div class="hr-line-dashed"></div>
									<div class="form-group">
									<input type="hidden" name="id" value="{$userinfo.id}">
									<div class="col-sm-4 col-sm-offset-2">
										<button class="btn btn-primary" type="submit">确认</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<script src="__PUBLIC__/Admin/js/jquery.min.js?v=2.1.4"></script>
		<script src="__PUBLIC__/Admin/js/bootstrap.min.js?v=3.3.6"></script>
		<script src="__PUBLIC__/Admin/js/content.min.js?v=1.0.0"></script>
		<script src="__PUBLIC__/Common/js/ajaxForm.js"></script>
		<script src="__PUBLIC__/Common/layer/layer.js"></script>
		<script>
			$(function(){
				$('#signform').ajaxForm({
					beforeSubmit: checkForm,
					success: complete, 
					dataType: 'json'
				});
				function checkForm(){
					
				}
				function complete(data){
					if(data.status==1){
						$('.btn-primary').attr('disabled','disabled');
						layer.msg(data.info, function(index){
			 				layer.close(index);
							window.parent.location.href=data.url;
						});
					}else{
						layer.msg(data.info);
						return false;	
					}
				}
			});
		</script>
	</body>

</html>